package com.book.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.book.core.domain.ReaderTypes;
import com.book.repository.ReaderTypesMapper;
import com.book.service.ReaderTypesService;
import org.springframework.stereotype.Service;

/**
* @author hongmizfb
* @description 针对表【reader_types(读者类型权限表)】的数据库操作Service实现
* @createDate 2025-05-07 21:28:53
*/
@Service
public class ReaderTypesServiceImpl extends ServiceImpl<ReaderTypesMapper, ReaderTypes>
    implements ReaderTypesService {

    @Override
    public Integer getCanBorrowCount(Integer readerId) {
        return lambdaQuery().eq(ReaderTypes::getTypeId, readerId).select(ReaderTypes::getMaxBorrow).one().getMaxBorrow();
    }
}




